
package group_01.MultiSnakeServerKryoNet;

import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryonet.EndPoint;

// This class is a convenient place to keep things common to both the client and server.
public class Network {
	static public final int port = 54555;

	// This registers objects that are going to be sent over the network.
	static public void register (EndPoint endPoint) {
		Kryo kryo = endPoint.getKryo();
		kryo.register(Host.class);
		kryo.register(Join.class);
		kryo.register(GameList.class);
		kryo.register(UpdateCharacter.class);
		
	}

	static public class Host {
		public String gameName;
		public int maxPlayers;
	}

	static public class Join {
		public String playerName;
		
	}
	
	static public class GameList {
		public String[] gameList;
		
	}

	static public class UpdateCharacter {
		public int id, x, y;
	}

}
